import { useEffect, useState } from "react";
import { getChannelListApi } from "@/apis/article";
const useChannel = () => { 
    //频道列表
  const [channelList, setChannelList] = useState([]);
  useEffect(() => {
    getChannelListApi().then((res) => {
      setChannelList(res.data.channels);
    });
  }, []);
  return { channelList };
}
export default useChannel;